<template>
  <div class="OrderDetailIndex">
    <div class="detail_left">
      <div class="content">
        <div class="head">
          <h1>订单标题：{{orderDetailInfo.title}}</h1>
          <span><i class="el-icon-sell"></i>收藏</span>
          <span><i class="el-icon-warning-outline"></i>举报</span>
        </div>
        <div class="tag">
          <el-tag v-for="t in orderDetailInfo.labels" :key="t.id" size="medium " type="info">{{ t.content }}</el-tag>
        </div>
        <div class="information">
          <h3>备注：</h3>
          <div class="text">
            <span>{{ orderDetailInfo.content }}</span>
          </div>
        </div>
        <div class="photograph">
          <h3>订单图片：</h3>
          <span v-for="x in orderDetailInfo.pictures" :key="x.id">
      <el-image
          style="width: 200px; height: 200px"
          :src="x.url"
          :preview-src-list="[x.url]">
      </el-image>
        </span>
        </div>
        <h3 class="address"><i class="el-icon-location-information"></i>详细地址：{{orderDetailInfo.address}}</h3>
        <div class="time">
    <span class="me-pull-right me-article-count" style="margin-left: 30px;font-size:150%">
        <i class="el-icon-time"></i>&nbsp;预计开始时间：{{ orderDetailInfo.startTime }}
         <i class="el-icon-time"></i>&nbsp;---预计结束时间：{{ orderDetailInfo.endTime }}
      </span>
        </div>
      </div>
      <el-divider></el-divider>
      <UserInfo v-if="orderDetailInfo.userCode === getuserInfo.id"></UserInfo>
      <HelpUserInfo v-if="snapshotInfo.helpUserCode === getuserInfo.id && snapshotInfo.status!==0"></HelpUserInfo>
    </div>
    <div class="detail_right">
      <OrderBar style="width: 100%;float: right;clear: right"></OrderBar>
      <div class="detail_right_bottom">

      </div>
    </div>
  </div>
</template>

<script>
import {mapState} from "vuex";
import UserInfo from "@/views/receiveOrder/UserInfo.vue";
import HelpUserInfo from "@/views/receiveOrder/HelpUserInfo.vue";
import OrderBar from "@/views/home/OrderBar.vue";

export default {
  name: "ReceiveOrderIndex",
  components:{
    UserInfo,
    HelpUserInfo,
    OrderBar
  },
  data() {
    return {
      orderDetail: {},
      value: 3.7,
    }
  },
  mounted() {
    this.$store.dispatch('OrderDetail', this.$route.query.orderInitiateCode);
    this.$store.dispatch('GetSnapshotInfo',this.$route.query.snapshotId);
  },
  computed: {
    ...mapState({
      snapshotInfo: state => state.myOrder.SnapshotInfo,
      orderDetailInfo: state => state.helpOrderItems.orderDetailInfo,
      userDetailInfo: state => state.helpOrderItems.userDetail,
      getuserInfo: state => state.user.userInfo,
    })
  },
  methods: {
  }
}
</script>

<style scoped>
.OrderDetailIndex{
  width: 1184px;
  margin: 0 auto;
  height: 820px;
  margin-top: 20px;
}
.detail_left{
  border-radius: 20px 20px 0 0;
  height: 820px;
  width: 70%;
  float: left;
  background-color: white;
}
.detail_left .content{
  margin-top: 20px;
}
.detail_left .content .head h1{
  float: left;
  width: 40%;
  margin-left: 30px;
}
.detail_left .content .head span{
  float: right;
  width: 40px;
  margin-right: 20px;
}
.tag{
  clear: left;
  width: 50%;
  padding-top: 20px;
}
.el-tag{
  margin-left: 30px;
}
.information{
  margin-top: 20px;
  margin-left: 30px;
}
.information h3{
  float: left;
}
.information .text{
  float: right;
  border: 1px solid #FFB3B3;
  border-radius: 11px 11px 11px 11px;
  margin-right: 14%;
  width: 80%;
  height: 60px;
  margin-top: -5px;
  background-color: #FFB3B3;
}
.information .text span{
  margin-left: 10px;
  padding-top: 5px;
}
.address{
  margin-top: 20px;
  font-size:150%;
  margin-left: 30px;
}
.photograph{
  padding-top: 20px;
  margin-left: 30px;
  clear: right;
}
.photograph .el-image{
  margin-top: 10px;
  margin-left: 5.5%;
}

/*右边*/
.detail_right{
  border-radius: 20px 20px 0 0;
  height: 820px;
  width: 28%;
  float: right;
  box-sizing: border-box;
}
.detail_right_bottom{
  clear: right;
  border-radius: 20px;
  height: 40%;
  background-color: #2c3e50;
  margin-top: 490px;
}
</style>
